package com.digitalchina.lxnsy.activity.farmTrain;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;

/**
 * ================================================
 * 项目名称：android
 * 类描述：需求详情
 * 创建人：yzm
 * 创建时间：2020/1/8 17:26
 * 修改备注：
 * ================================================
 */
public class DemandDetailActivity extends BaseHtmlActivity {

    private String json = "";

    @Override
    protected void loadHtml() {
        json = (String) getIntent().getSerializableExtra("msg");
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("train-demand-details");
        setTitle("需求详情");
        if (json != null && json.equals("1")) {
            setRightText("收藏");
        }
    }

    @Override
    public void rightOnClick() {
        callJsMethod("store");
    }

    public class JsApi {
        //立即报价
        @JavascriptInterface
        public void quote(Object msg) {
            go(QuoteEditActivity.class);
        }
    }
}
